]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Switch back to using the :has-pointer property
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 22 Jul 2017 09:47:20 +0000 (11:47 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 22 Jul 2017 18:31:46 +0000 (20:31 +0200)
In case where a method- and property name overlap, using the method
is less unambiguous than I thought - mozjs52-based gjs will only see
the method, while mozjs38-based gjs will only see the property. We
are in luck though, and the real property name contains dashes that
allow us to refer to the property in a way that works for all gjs
versions.

https://bugzilla.gnome.org/show_bug.cgi?id=785090

js/ui/workspace.js

index ff2618a516c97fbffce56972bc70dcf97bc9f4bc..440da587aa585471d07a629fe696e10aaf724e81 100644 (file)
@@ -500,7 +500,7 @@ var WindowOverlay = new Lang.Class({
         this._hidden = false;
 
         this.title.show();
-        if (this._windowClone.actor.has_pointer())
+        if (this._windowClone.actor['has-pointer'])
             this._animateVisible();
     },
 
@@ -699,8 +699,8 @@ var WindowOverlay = new Lang.Class({
     _idleToggleCloseButton: function() {
         this._idleToggleCloseId = 0;
 
-        if (!this._windowClone.actor.has_pointer() &&
-            !this.closeButton.has_pointer())
+        if (!this._windowClone.actor['has-pointer'] &&
+            !this.closeButton['has-pointer'])
             this._animateInvisible();
 
         return GLib.SOURCE_REMOVE;